<template>
  <ElImageViewer
    v-if="visible"
    :on-close="closeViewer"
    :url-list="viewerImageUrl"
  />
</template>
<script>
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
export default {
  name: 'CImageViewer',
  components: { ElImageViewer },
  props: {
    viewerImageUrl: {
      type: Array,
      default: () => []
    },
    visible: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    closeViewer() {
      this.$emit('update:visible', false)
      this.$emit('update:viewerImageUrl', [])
    }
  }
}
</script>
